<template>
  <!-- 热门景点 -->
  <div>
    <top-nav>
      <div class="div-top">热门景点</div>
    </top-nav>
    <div class="next-model">
      <InputNav></InputNav>
      <div class="list-1" v-for="m in menuNav" :key="m.id">
        <router-link :to="{name:m.name,query:{list:m.id}}">
          <img class="img2" :src="m.img" alt="" /></router-link>
        <div class="list-2">
          <span class="list-2-1">{{ m.label }}</span>
          <div class="list-2-2">
            <span class="list-2-3">{{ m.money }}</span>
            <span class="list-2-4" v-if="m.money != '免费'">{{ m.span }}</span>
          </div>
        </div>
        <div class="imgDiv">
          <img class="img1" src="../assets/地址555@3x.png" alt="" />
          <span class="imgSpan">{{ m.site }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getScenic } from '@/api/home';

export default {
  data() {
    return {
      menuNav: [],
    };
  },
  created() {
    this.getScenic();
  },
  methods: {
    async getScenic() {
      const { data } = await getScenic();
      this.menuNav = data;
    },
  },
};
</script>
<style lang="scss" scoped>
.div-top {
  font-size: 17px;
  color: #333333;
  letter-spacing: 0;
  text-align: center;
  line-height: 44px;
}
.next-model {
  background: #ffffff;
  .list-1 {
    width: 345px;
    height: 264px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    background: #ffffff;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: 10px;
    margin-bottom: 20px;
    .img2 {
      width: 315px;
      height: 168px;
    }
    .imgDiv {
      width: 315px;
      .img1 {
        width: 16px;
        height: 16px;
      }
      .imgSpan {
        font-size: 14px;
        color: #bbbbbb;
      }
    }
    .list-2 {
      //中间一行字
      display: flex;
      width: 315px;
      justify-content: space-between;
      .list-2-1 {
        font-size: 18px;
        color: #333333;
      }
      .list-2-2 {
        .list-2-3 {
          color: #e52f17;
          font-size: 17px;
        }
        .list-2-4 {
          font-size: 12px;
          color: #151515;
        }
      }
    }
  }
}
</style>
